<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
	</head>
	<body>
		<script type="module">
			import render from "./rende.js";
			// 定义一个虚拟DOM,
			// target 表示DOM的标签名称
			// props  表示用来藐视标签属性、时间等内容的对象
			// childred 表示标签的子节点
			const vnode = {
				target: "div",
				props: { color: "red", fontSize: "16px", name: "test" },
				children: [
					{
						target: "span",
						props: {
							onclick: () => {
								console.log("test");
							},
						},
						children: "click me",
					},
				],
			};

			render(vnode, document.body);
		</script>
	</body>
</html>
